char ToHex(char b)
{
	char  c = b & 0x0f;
    if (c>9) c += 'A'-10;
    else c += '0';

	return c;
}



char Hex2Bin(char hex)
{
	char bin;
		bin = (hex <= '9' ? hex - '0' : hex - '0' - 7) ;
	return bin;
}
